package com.hc.fdkforwarders.controller;

import com.hc.fdkforwarders.common.Result;
import com.hc.fdkforwarders.param.GoodsScannedParam;
import com.hc.fdkforwarders.service.GoodsScannedService;
import com.hc.fdkforwarders.service.fegin.client.ForwardersApi;
import com.hc.fdkforwarders.vo.GoodsScannedVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class GoodsScannedController {

    @Autowired
    ForwardersApi forwardersApi;
    @Autowired
    GoodsScannedService goodsScannedService;

    @PostMapping("/scan/tag/and/get/detail")
    public Result<GoodsScannedVO> goodsScannedForwarder(@RequestBody GoodsScannedParam goodsScannedParam){
        return Result.ok(goodsScannedService.goodsScanned(goodsScannedParam.getBarcode()));
    }

}
